Skip to content

Fix reboot without message #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025

Conversation

jkmar
Copy link
Contributor

@jkmar jkmar commented May 6, 2025

What I did

Fix gNOI cold reboot no message issue: sonic-net/sonic-buildimage#22545

How I did it

Use get instead of [] to cover no reboot message case

How to verify it

Tested gNOI warm reboot on a hardware switch.

root@sonic:~# docker exec -it gnmi bash
root@sonic:/# gnoi_client -notls -insecure -module System -rpc Reboot -jsonin '{"method":1}'
System Reboot
root@sonic:/# exit
root@sonic:~# journalctl -u sonic-hostservice.service -f
...
May 06 07:37:47 sonic python3[699742]: reboot: issue_reboot rpc called
May 06 07:37:47 sonic python3[699742]: reboot: Issuing cold reboot
...
May 06 07:38:18 sonic CCmisApi[700542]: reboot: Initiate shutdown command
client_loop: send disconnect: Broken pipe

Previous command output (if the output of a command-line utility has changed)

root@sonic:~# journalctl -u sonic-hostservice.service
...
May 06 01:28:14 sonic python3[514659]: reboot: issue_reboot rpc called

no more logs after that

New command output (if the output of a command-line utility has changed)

root@sonic:~# journalctl -u sonic-hostservice.service
...
May 06 07:37:47 sonic python3[699742]: reboot: issue_reboot rpc called
May 06 07:37:47 sonic python3[699742]: reboot: Issuing cold reboot
...
May 06 07:38:18 sonic CCmisApi[700542]: reboot: Initiate shutdown command

reboot is executed successfully

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkmar jkmar marked this pull request as ready for review May 6, 2025 15:43
@jkmar jkmar force-pushed the fix_reboot_without_message branch from 233fb2d to 19564a4 Compare May 6, 2025 15:53
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkmar
Copy link
Contributor Author

jkmar commented May 14, 2025

Copy link

@anders-nexthop anders-nexthop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simple fix with a straightforward test included. Maintainers, please approve and merge.

@vvolam vvolam requested review from hdwhdw, kishanps and liuqu May 21, 2025 18:16
Copy link
Contributor

@vvolam vvolam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank you!

@kishanps
Copy link

Adding @github76543 (John) for review.

@qiluo-msft qiluo-msft merged commit 23b81f9 into sonic-net:master May 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants